﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace TitipNyobaYan.Models
{
    class ORANGMap:ClassMap<ORANG>
    {
        public ORANGMap()
        {
            Table("ORANG");
            LazyLoad();
            Id(x => x.ID_ORANG).GeneratedBy.Assigned().Column("ID_ORANG") ;
            Map(x => x.NAMA_ORANG).Column("NAMA_ORANG").Length(25);
            Map(x => x.ALAMAT_ORANG).Column("ALAMAT_ORANG").Length(30);
            Map(x => x.TELEPON_ORANG).Column("TELEPON_ORANG").Length(15);
            Map(x => x.HAK_AKSES_ORANG).Column("HAK_AKSES_ORANG");
            Map(x => x.STATUS_ORANG).Column("STATUS_ORANG");
            Map(x => x.PASS_ORANG).Column("PASS_ORANG").Length(25);
            HasMany(x => x.LIST_DENDA).Inverse();
            HasMany(x => x.LIST_DIPINJAM).Inverse();
            HasMany(x => x.LIST_REVIEW).Inverse();
        }
    }
}
